<?php

class CMS_Helper {

    /**
     * Collapse the given string to given length
     *
     * This function returns the collapse string with given length.
     *
     * @param string $_text String to collapse
     * @param int $_length maximum length
     * @return string
     */
    public static function getCollapseText($_text, $_length = 150) {
	if (strlen($_text) > $_length) {
	    return substr($_text, 0, $_length) . "...";
	}
	return $_text;
    }

}

?>
